#
# @lc app=leetcode.cn id=4 lang=python
#
# [4] 寻找两个正序数组的中位数
#

# @lc code=start
class Solution(object):
    def findMedianSortedArrays(self, nums1, nums2):
        """
        :type nums1: List[int]
        :type nums2: List[int]
        :rtype: float
        """
        #暴力法
        num = sorted(nums1 + nums2) 
        if len(num)%2 == 0:
            i = len(num)//2
            j = len(num)//2-1
            return (num[i] + num[j])/2
        else:
            i = len(num)//2
            return num[i]

a = Solution()
print(a.findMedianSortedArrays([],[1]))
# @lc code=end
